<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>意见反馈</title>
    <link rel="stylesheet" href="./css/style.css">
    <link rel="stylesheet" href="./css/tool.css">
</head>
<body>
<header>
    <div class="header_conter" id="userInfo">
        <div class="title">
            CAAE基金申报管理系统
        </div>


        <div class="nav_box">
            <ul>
                <li>
                    <a href="./index.html">
                        <img class="icon" src="./img/nav_index.png" alt="">
                        <p class="nav_title">首页</p>
                    </a>
                </li>
                <li>
                    <a href="./state.html">
                        <img class="icon" src="./img/nav_jd.png" alt="">
                        <p class="nav_title">项目进度</p>
                    </a>
                </li>
                <li class="active">
                    <a href="./opinion.html">
                        <img class="icon" src="./img/nav_yjfk_active.png" alt="">
                        <p class="nav_title">意见反馈</p>
                        <span class="chat_num" v-show="num>0" >{{num}}</span>
                    </a>
                </li>
                <li>
                    <a href="./declare.html">
                        <img class="icon" src="./img/nav_sbjl.png" alt="">
                        <p class="nav_title">申报记录</p>
                    </a>
                </li>
            </ul>
        </div>
        
        <div class="user_box">
            <img class="user_tx" src="./img/tx.png" alt="">
            <p>{{userName}}</p>
            <p style="color: blue; cursor:pointer;" @click="loginOut">退出</p>
        </div>
        
    </div>
</header>


<div class="header_conter">
    <div class="content_box" id="feedback">
        <div class="m_item">
            <img src="./img/t_title.png" alt="" style="margin-right: 4px;">
            <span class="title18">全部记录</span> <span>{{msg}}</span>
        </div>

        <div class="m_item px-2" v-for="item in data" @click="jump(item)">
            <h2>{{item.title}}</h2>
            
            <p class="title14">{{item.content}}  
                <span  v-show="isShow(item)" style="color:#5ED2FB; font-size: 14px; cursor: pointer;" @click="download(item)">下载</span>
                <span  v-show="item.corrected=='1'" style="color:#5ED2FB; font-size: 14px;">补正</span>
            </p>
            <p class="content14">{{item.timeDeparture}}</p>
        </div>



    </div>

</div>

<script type="text/javascript" src="./js/vue.js"></script>
<script type="text/javascript" src="./js/axios.min.js"></script>
<script type="text/javascript" src="./js/config.js"></script>
<script type="text/javascript" src="./js/info.js"></script>

<script>

    const feedApp = new Vue({
    el: "#feedback",
    data: {
        msg:"",
        data:[]
    },

    methods: {

        isShow(item) {
            if (item.enclosure == null) {
                return false;
            }else if (item.enclosure.length == 0) {
                return false;
            }else{
                return true;
            }
        },

        jump (item){

            console.log(item.applicationId);
            if (item.informationType == "reject" && item.isCorrection == "1") {
                window.location.href = "./writeTable.html?applicationId=" + item.applicationId + "&isRepair=1" + "&typeId=" + item.fundId + "&informationId=" + item.id;
            }

        },

        download (item){

            console.log(item.id);
            
            let url = BaseUrl + "client/applicationClient/downloadInformationEnclosure?id=" + item.id;
            window.location.href = url;

            

        }



        
    },

    
    created:function(){
        var that = this;
        axios.get(BaseUrl + "client/informationListfindByLoginId?loginId="+localStorage.getItem("loginId")).then(
            function(response) {
            console.log(response.data.data);
                if (response.data.code == 200) {

                    that.data = response.data.data;
                    that.msg = "共" + that.data.length + "条记录";
                }else{
                    alert(response.data.massage);
                }
            },
            function(err) {
                alert("请检查网络后再试");
            }
        );
    },
    });

</script>




</body>
</html>